﻿using System.ComponentModel.DataAnnotations;
using Xcj.Mes.WholeLine.DataBase.Common;

namespace Xcj.Mes.WholeLine.DataBase.Entity
{
    public class QuickWearPartEntity : BaseEntity
    {
        // 钉卷 组立 老化 座板 其它
        private string _deviceType = string.Empty;
        [Alias("设备类型"), StringLength(32)]
        public string DeviceType
        {
            get => _deviceType;
            set
            {
                _deviceType = value?.Trim();
                RaisePropertyChanged();
            }
        }

        private string _name = string.Empty;
        [Alias("易损件名称"), StringLength(64)]
        public string Name
        {
            get => _name;
            set
            {
                _name = value?.Trim();
                RaisePropertyChanged();
            }
        }

        private int _LimitedNumber = 500000;
        [Alias("限定次数")]
        public int LimitedNumber
        {
            get => _LimitedNumber;
            set
            {
                _LimitedNumber = value;
                RaisePropertyChanged();
            }
        }
        
        private int _warningNumber = 50000;
        [Alias("预警次数")]
        public int WarningNumber
        {
            get => _warningNumber;
            set
            {
                _warningNumber = value;
                RaisePropertyChanged();
            }
        }
        
        private int _usedTimes = 0;
        [Alias("已用次数")]
        public int UsedTimes
        {
            get => _usedTimes;
            set
            {
                _usedTimes = value;
                RaisePropertyChanged();
            }
        }
        
        private int _remainingTimes = 0;
        [Alias("剩余次数")]
        public int RemainingTimes
        {
            get => _remainingTimes;
            set
            {
                _remainingTimes = value;
                RaisePropertyChanged();
            }
        }
        
        private int _beforeUsedTimes = 0;
        [Alias("换件前累计已用次数")]
        public int BeforeUsedTimes
        {
            get => _beforeUsedTimes;
            set
            {
                _beforeUsedTimes = value;
                RaisePropertyChanged();
            }
        }

        private int _afterUsedTimes = 0;
        [Alias("换件后累计已用次数")]
        public int AfterUsedTimes
        {
            get => _afterUsedTimes;
            set
            {
                _afterUsedTimes = value;
                RaisePropertyChanged();
            }
        }
    }
}
